package com.chidopi.cdf.struts1actions;

import javax.servlet.ServletException;

import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.beanutils.converters.DateConverter;

public class ActionServlet extends org.apache.struts.action.ActionServlet {

	@Override
	protected void initOther() throws ServletException {
		super.initOther();
  
		DateConverter d = new DateConverter(null);
		String[] datePattern = { "yyyy/MM/dd", "yyyy/mm/dd HH:mm:ss", "yyyy-MM-dd",  "yyyy.MM.dd" };
		d.setPatterns(datePattern);
		ConvertUtils.register(d, java.util.Date.class);
		ConvertUtils.register(d, String.class);
	}

}
